function removeAllFlashMessages()
{
	$('.flashMessage').remove();
}

function removeFlashMessage()
{
	$('.flashMessage').click(function(){
		var obj		= $(this);
		var height	= obj.outerHeight();
		obj.animate({'bottom': -height},500);
		setTimeout(function(){obj.remove()},1000);
	});
}

function setFlashMessage(type, title, text)
{
	$('body').append("<div class=\"flash"+type+" flashMessage\"><h3>"+title+"</h3><p>"+text+"</p></div>");
	removeFlashMessage();
}